The present invention relates to a peripheral device used as a programming tool and the like for creating a sequence program for a programmable controller for controlling mechanical equipment. More particularly, this invention relates to a peripheral device having a function for checking a sequence program.
FIG. 18 shows a peripheral device for a programmable controller (hereinafter referred to as a PC peripheral device in some cases) in the conventional technology.
A PC peripheral device 300 is provided with a processing section 301 formed by a CPU or the like, a main storage section 302, an auxiliary storage section 303, a key input control section 304, a screen control section 305, and a printer control section 306. A keyboard 307 is connected to the key input control section 304, a display unit 308 formed by a CRT or the like is connected to the screen control section 305, and a printer 309 is connected to the printer control section 306.
The main storage section 302 is allocated for a system program area 310, a sequence program area 311, and a device range information area 312. A system program is stored in the system program area 310, a sequence program is stored in the sequence program area 311, and device range information is stored in the device range information area 312.
FIG. 19 shows a device allocation table of a PC peripheral device. The device allocation table is stored in the device range information area 312 and defines the range of each device. The device allocation table contains information such as points information 400 on each device, as well as local device range information 401 and global device range information 402 for each device.
Note that a local device is a device allocated for each sequence program, while a global device is a device common to all sequence programs.
The programmable controller peripheral device 300 stores sequence programs input by the keyboard 307 via the key input control section 304 in the sequence program area 311 of the main storage section 302. It also stores device range information in the device range information area 312 of the main storage section 302. The sequence programs and device range information stored in each area are output to the display unit 308 via the screen control section 305 and to the printer 309 via the printer control section 306, and are stored in the auxiliary storage section 303.
Here, the sequence program and device range information will be taken as already created and stored in the main storage section 302.
When checking as to whether or not there is an error in a value of a device used in a sequence program, a check instruction is given using the keyboard 307 via the key input control section 304. Based on this check instruction, the processing section 301 executes a check routine in the system program. This check routine will be described below while referring to FIG. 20.
Based on the check instruction, processing is executed so that the data of one command is acquired from the sequence program (step S301). Processing is then executed to check whether or not a device is being used in the command (step S302).
If a device is included, processing to acquire the device number is executed (step S303). Processing is then executed to check whether or not the device number exceeds the points of the device point information (step S304).
In this check, if the device number exceeds the points of the device point information, error display processing is executed to report that the range is exceeded (step S305).
It is then verified whether or not the checking has been completed down to the final step (step S306), and the above processing sequence is repeated as far as the final step.
As an example, when checking a sequence program such as that shown in FIG. 21, the checking is performed in sequence from the first command of the sequence program. When the third command is checked, xe2x80x9cMOV K40 D9000xe2x80x9d is acquired, and xe2x80x9cD9000xe2x80x9d is acquired as the device used in the command.
As shown in FIG. 22, the device xe2x80x9cD9000xe2x80x9d and the device range information of the device D are compared, and a check is made as to whether or not the device xe2x80x9cD9000xe2x80x9d is within the range of the points of the device D in the device range information. As the points of the device D are xe2x80x9c8191xe2x80x9d, while the number of the device xe2x80x9cD9000xe2x80x9d is xe2x80x9c9000xe2x80x9d, the device xe2x80x9cD9000xe2x80x9d is outside the range of the device D. Therefore, an error such as that shown in FIG. 23 is displayed. In the error display, the command number (list line) where the command which uses the device that exceeds the device range is present as well as one command and device range information (maximum value) are displayed on the screen.
However, because the seventh xe2x80x9cBMOVxe2x80x9d command of the sequence program shown in FIG. 21 is a command for copying 10 groups of data starting from xe2x80x9cD0xe2x80x9d to 10 data areas starting from xe2x80x9cD8190xe2x80x9d, the ten groups of data starting from the data transfer destination device xe2x80x9cD8190xe2x80x9d are form the range xe2x80x9cD8190xe2x80x9d-xe2x80x9cD8199xe2x80x9d. This exceeds the maximum value of the points of the device D, however, in a conventional PC peripheral device, because whether or not the data transfer destination device xe2x80x9cD8190xe2x80x9d is outside the device range is only being checked, no error results.
Further, in a conventional PC peripheral device, because it is not possible to check whether or not devices connected by a device notation indicating consecutive areas and commands specifying consecutive devices present in the sequence program are local devices and global devices used in combination, this check has to be performed by visually confirming the sequence program. Such a check is extremely troublesome and inconvenient, and errors in the operation of the programmable controller caused by mistakes in the checking may occur.
Furthermore, in a conventional PC peripheral device, because it is also not possible to check the checking as to whether or not devices connected by a device notation indicating consecutive areas and commands specifying consecutive devices present in the sequence program are used singly by other commands present in the sequence program, this check has to be performed by an operator visually confirming the sequence program. Such a check is extremely troublesome and inconvenient, and errors in the operation of the programmable controller caused by mistakes in the checking may occur.
Furthermore, in a conventional PC peripheral device, because it is not possible to check whether or not index modified results of commands specifying index modification devices present in the sequence program are used by other commands present in the sequence program, this check has to be performed by an operator visually confirming the sequence program. Such a check is extremely troublesome and inconvenient, and errors in the operation of the programmable controller caused by mistakes in the checking may occur.
The present invention has been achieved in order to solve the above problems. It is an object of the present invention to provide a peripheral device for a programmable controller capable of performing each of the checks below automatically, without the necessity of the confirmation work of the sequence program itself by watching by an operator. Namely, a check as to whether or not devices connected by a device notation and commands specifying consecutive devices present in a sequence program are local devices and global devices used in combination; and whether or not local devices and global devices are being used in combination in a device notation; a check as to whether or not consecutive devices of commands specifying consecutive devices present in the sequence program are used alone by other commands present in the sequence program; and a check as to whether or not index modified results of commands specifying index modification devices present in the sequence program are used by other commands present in the sequence program.
According to one aspect of the present invention, a peripheral device for a programmable controller comprises a storage unit which stores a range of a device allocated for each sequence program, and a device range checking unit which sequentially extracts device notations indicating consecutive areas and commands specifying consecutive devices present in a sequence program, expands devices of corresponding consecutive areas, and checks whether or not devices of consecutive areas are within a range of devices stored in the storage unit.
Therefore, the device range checking unit sequentially extracts device notations indicating consecutive areas and commands specifying consecutive devices present on the sequence program, expands devices of the corresponding consecutive areas, and checks whether or not devices of consecutive areas are within the range of devices stored in the storage unit.
According to another aspect of the present invention, a peripheral device for a programmable controller comprises a storage unit which stores device range information which defines a range of a local device allocated for each sequence program and a range of a global device common to each sequence program; and a combined local device/global device use checking unit which sequentially extracts device notations indicating consecutive areas and commands specifying consecutive devices present in a sequence program, expands devices of corresponding consecutive areas, and checks whether or not local devices and global devices are used in combination for devices of consecutive areas, by referring to device range information stored in the storage unit.
Therefore, the combined local device/global device use checking unit sequentially extracts device notations indicating consecutive areas and commands specifying consecutive devices present in a sequence program, expands devices of the corresponding consecutive areas, and checks whether or not local devices and global devices are used in combination for devices of consecutive areas, by referring to device range information stored in the storage unit.
According to still another aspect of the present invention, a peripheral device for a programmable controller comprises a device overlapping use checking unit which sequentially extracts notations indicating consecutive areas and commands specifying consecutive devices present in a sequence program, expands corresponding consecutive areas, and checks overlapping use of devices by comparing devices of consecutive areas with devices used by other commands present in an identical sequence program.
Therefore, the device overlapping use checking unit sequentially extracts notations indicating consecutive areas and commands specifying consecutive devices present in the sequence program, expands the corresponding consecutive areas, and checks overlapping use of devices by comparing devices of consecutive areas with devices used by other commands present in the identical sequence program.
According to still another aspect of the present invention, a peripheral device for a programmable controller comprises a device overlapping use checking unit which sequentially extracts commands specifying index modification devices present in a sequence program, and checks overlapping use of devices by comparing index modified result devices with devices used by other commands present in an identical sequence program.
Therefore, the device overlapping use checking unit sequentially extracts commands specifying index modification devices present in the sequence program, and checks overlapping use of devices by comparing index modified result devices with devices used by other commands present in the identical sequence program.
According to still another aspect of the present invention, a peripheral device for a programmable controller comprises a processing section formed by a CPU or the like, a main storage section allocated for a system program area which stores a system program, a sequence program area which stores a sequence program, and a device range information area, an auxiliary storage section, a key input control section, and a screen control section, wherein device range information specifying a device range is stored in the device range information area, and device notations indicating consecutive areas and commands specifying consecutive devices present in a sequence program are sequentially extracted by the processing section running a system program stored in the system program area, devices of corresponding consecutive areas are expanded, whether or not the consecutive devices are within a device range defined by device range information stored in the device range information area is checked, and a result is displayed on a display unit connected to the screen control section.
Therefore, device notations indicating consecutive areas and commands specifying consecutive devices present in the sequence program are sequentially extracted by the processing section running the system program, devices of the corresponding consecutive areas are expanded, whether or not the consecutive devices are within the device range defined by device range information stored in the device range information area is checked. The result is displayed on the display unit connected to the display control section.
According to still another aspect of the present invention, a peripheral device for a programmable controller comprises a processing section formed by a CPU or the like, a main storage section allocated for a system program area which stores a system program, and a, sequence program area which stores a sequence program, and a device range information area, an auxiliary storage section, a key input control section, and a screen control section, wherein device range information which defines a range of a local device allocated for each sequence program and a range of a global device common to each sequence program is stored in the device range information area, and device notations indicating consecutive areas and commands specifying consecutive devices present in a sequence program in the sequence program area are sequentially extracted by the processing section running a system program stored in the system program area, devices of consecutive areas are expanded based on the above extraction, whether or not local devices and global devices are used in combination for the devices of the consecutive areas is checked by referring to the device range information, and a result is displayed on a display unit connected to the screen control section.
Therefore, device notations indicating consecutive areas and commands specifying consecutive devices present in the sequence program in the sequence program area are sequentially extracted by the processing section running the system program, devices of the corresponding consecutive areas are expanded, whether or not local devices and global devices are used in combination for the devices of the consecutive areas is checked by referring to the device range information. The result is displayed on the display unit connected to the display control section.
According to still another aspect of the present invention, a peripheral device for a programmable controller comprises a processing section formed by a CPU or the like, a main storage section allocated for a system program area which stores a system program and a sequence program area which stores a sequence program, an auxiliary storage section, a key input control section, and a screen control section, wherein notations indicating consecutive areas and commands specifying consecutive devices present in a sequence program stored in the sequence program area are sequentially extracted by the processing section running a system program stored in the system program area, devices of corresponding consecutive areas are expanded, overlapping use of devices is checked by comparing devices of consecutive areas with devices used by other commands present in an identical sequence program, and a result is displayed on a display unit connected to the screen control section.
Therefore, notations indicating consecutive areas and commands specifying consecutive devices present in the sequence program stored in the sequence program area are sequentially extracted by the processing section running the system program, devices of the corresponding consecutive areas are expanded, overlapping use of devices is checked by comparing devices of consecutive areas with devices used by other commands present in the identical sequence program. The result is displayed on the display unit connected to the display control section.
According to still another aspect of the present invention, a peripheral device for a programmable controller comprises a processing section formed by a CPU or the like, a main storage section allocated for a system program area which stores a system program and a sequence program area which stores a sequence program, an auxiliary storage section, a key input control section, and a screen control section, wherein commands specifying index modification devices present in a sequence program stored in the sequence program area are sequentially extracted by the processing section running a system program stored in the system program area, overlapping use of devices is checked by comparing index modified result devices with devices used by other commands present in an identical sequence program, and a result is displayed on a display unit connected to the screen control section.
Therefore, commands specifying index modification devices present in the sequence program stored in the sequence program area are sequentially extracted by the processing section running the system program stored in the system program area, overlapping use of devices is checked by comparing index modified result devices with devices used by other commands present in the identical sequence program. The result is displayed on the display unit connected to the display control section.